import BasicLayout from "@/layouts/basicLayout.vue";
const BlankLayout = () => import("@/layouts/blankLayout.vue");
export const constantRoutes = [
    {
        path: "/login",
        name: "login",
        component: () => import("@/views/login/index.vue"),
    },
    {
        path: "/404",
        component: () => import("@/views/error/404.vue"),
    },
];
export const asyncRouters = [
    {
        path: "/",
        component: BasicLayout,
        redirect: "/home",
        children: [
            {
                path: "/home",
                name: "home",
                component: () => import("@/views/home/index.vue"),
                meta: {
                    roles: ["admin", "user"],
                    title: "部门架构",
                    icon: "message",
                    isKeepAlive: true,
                },
                children: [],
            },
            {
                path: "/user",
                name: "user",
                redirect: "/user/user_item_one",
                meta: {
                    roles: ["admin", "user"],
                    title: "用户列表",
                    icon: "user",
                },
                component: BlankLayout,
                children: [
                    {
                        path: "/user/user_item_one",
                        name: "userItemOne",
                        meta: {
                            roles: ["admin", "user"],
                            title: "二级菜单1",
                            isKeepAlive: true,
                        },
                        component: () => import("@/views/user/userItemOne.vue"),
                    },
                    {
                        path: "/user/user_item_two",
                        name: "userItemTwo",
                        meta: {
                            roles: ["admin", "user"],
                            title: "二级菜单2",
                        },
                        component: () => import("@/views/user/userItemTwo.vue"),
                    },
                ],
            },
            {
                path: "/apply",
                name: "apply",
                redirect: "/apply/apply_item_one",
                meta: {
                    roles: ["admin"],
                    title: "应用列表",
                    icon: "service",
                },
                component: BlankLayout,
                children: [
                    {
                        path: "/apply/apply_item_one",
                        name: "applyItemOne",
                        roles: ["admin"],
                        meta: {
                            title: "应用菜单1",
                        },
                        component: () =>
                            import("@/views/apply/applyItemOne.vue"),
                    },
                    {
                        path: "/apply/apply_item_two",
                        name: "applyItemTwo",
                        roles: ["admin"],
                        meta: {
                            title: "应用菜单2",
                        },
                        component: () =>
                            import("@/views/apply/applyItemTwo.vue"),
                    },
                ],
            },
        ],
    },
];
export default {
    constantRoutes,
    asyncRouters,
};
